After completing this lesson, you’ll be able to:
You have successfully published a workspace to FME Flow that creates a 3D visualization of recent earthquakes around the world in KML format, using data from the United States Geological Survey. Now you are getting requests from other users who do not have FME Flow accounts but want to be able to run the workspace on demand.
Let's create an FME Flow App so that anyone with the URL can run this workspace to get an up-to-date KML whenever they wish.
Browse to the login page of the FME Flow interface, and log in using the administrator account (admin/FMElearnings).
Expand Flow Apps from the side menu, then click Create Workspace App, to create a new Workspace App.
Set a Name, Title, and Description for your new Flow App. The Name is what is displayed in the list of Workspace Apps and the Title and Description is what will be displayed on the actual App. Select the Samples Repository and the earthquakesextrusion.fmw workspace. Select ‘Data Streaming’ as the Service. This will allow the information to be streamed back to the user directly within the browser (if supported).
You can leave the expiration time at its default value, which will allow the API Token to expire after 10 years. You could set this to a shorter time if you only want to grant access for a smaller time window.
Keep the Require Authentication toggle disabled. This setting will allow anyone with the URL to run the workspace.
Keep the Users Can Upload toggle enabled. This setting will allow users to upload their own GeoJSON input file instead of using the USGS data.
There are two collapsed sections below the first: Parameters and Customize. Click the Parameters section to expand it. You will see the workspace's user parameters, similar to how they appear on the Run Workspace page on FME Flow. You can see the source dataset is set to a URL (http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/2.5_week.geojson), pulling the recent earthquake data directly from the USGS web service.
We don't want to modify how this works.
The Customize section lets you change the appearance of your Flow App, but you will learn more about that in the next lesson.
Click OK to accept.
Now that your App has been created, you'll see that a URL was generated for it.
Click on the URL to open it. You will see that it opens a webpage very similar to the Run Workspace page in FME Flow, but it has no options other than to run this one workspace and it does not require a user to enter a username and password to access it.
We've been requested to create a webhook to share our workspace with customers in an email.
From the Run Workspace page, ensure that the Workspace is set to earthquakesextrusion.fmw, then from the Workspace Actions drop-down select Create Webhook
On the Create Webhook page, we can just accept the defaults for the parameters. Optionally, you can add additional permissions for the user, such as access to the data folder. Click OK to create the Webhook.
Before closing the Webhook URL page, ensure that you download your Webhook token and parameters as this will be the only time you can do so. If you forget to download it or lose the file, you will have to recreate the Webhook.